import requests from '../request';

// 获取用户地址信息
export const reqFindUserAddressList = ()=>requests({
  url:`/user/userAddress/auth/findUserAddressList`,
  method:'get',
})
// 获取订单交易页信息 /api/order/auth/trade GET
export const reqOrderTradeList = ()=>requests({
  url:`/order/auth/trade`,
  method:'get',
})

//提交订单的接口
//URL:/api/order/auth/submitOrder?tradeNo={tradeNo}  method:post
export const reqSubmitOrder = (tradeNo,data)=>requests({url:`/order/auth/submitOrder?tradeNo=${tradeNo}`,data,method:'post'});

// 获取订单支付信息 /api/payment/weixin/createNative/{orderId} GET orderId	支付订单ID(通过提交订单得到)
export const reqPayInfo = (orderId)=>requests({url:`/payment/weixin/createNative/${orderId}`,method:'GET'});

//获取支付订单状态
//URL:/api/payment/weixin/queryPayStatus/{orderId}  get
export const reqPayStatus = (orderId)=>requests({url:`/payment/weixin/queryPayStatus/${orderId}`,method:'get'});

//获取个人中心的数据
//api/order/auth/{page}/{limit}  get limit:每页展示数据 page当前第几页

export const reqMyOrderList = (page,limit)=>requests({
  url:`/order/auth/${page}/${limit}`,
  method:'get'
})